package model

import (
	"github.com/zeromicro/go-zero/core/stores/cache"
	"github.com/zeromicro/go-zero/core/stores/monc"
)

var _ PaperModel = (*customPaperModel)(nil)

type (
	// PaperModel is an interface to be customized, add more methods here,
	// and implement the added methods in customPaperModel.
	PaperModel interface {
		paperModel
	}

	customPaperModel struct {
		*defaultPaperModel
	}
)

// NewPaperModel returns a model for the mongo.
func NewPaperModel(url, db, collection string, c cache.CacheConf) PaperModel {
	conn := monc.MustNewModel(url, db, collection, c)
	return &customPaperModel{
		defaultPaperModel: newDefaultPaperModel(conn),
	}
}
